﻿@{
    Layout = null;
}
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
    <meta http-equiv="Cache" content="no-cache" />
    <title>脑出血病历打印</title>
    <script src="~/Scripts/jquery-1.10.2.min.js"></script>
    <script src="~/Scripts/common.js?v=@DateTime.Now.ToString("yyyyMMdd")"></script>
    <script src="~/Scripts/CreateControl.js?v=@DateTime.Now.ToString("yyyyMMdd")" type="text/javascript"></script>
</head>
<body style="height:1500px;">
    <script type="text/javascript">
        CreatePrintViewerEx("100%", "80%", '@Url.Content("~/Grf/Ncxmr.grf")' + '?id=' + getRnd(), "", true, "<param name=BorderStyle value=1>");
        $(document).ready(function () {
            PrintStart();
        });
        function PrintStart() {
            var pid = "@ViewBag.patientId";
            $.ajax({
                url: "/StrokeCenter/MedicalRecords/Get_Cerebralhemorrhage?patientid=" + pid,
                cache: false,
                success: function (data) {
                    var d = $.parseJSON(data);
                    if (d != null) {
                        ReportViewer.Stop();
                        var Report = ReportViewer.Report;
                        var Recordset = ReportViewer.Report.DetailGrid.Recordset;
                        //获取标签对象
                        var PATIENT_NAME = ReportViewer.Report.FieldByName("PATIENT_NAME");
                        var PATIENT_SEX = ReportViewer.Report.FieldByName("PATIENT_SEX");
                        var PATIENT_AGE = ReportViewer.Report.FieldByName("PATIENT_AGE");
                        var PATIENT_ID = ReportViewer.Report.FieldByName("PATIENT_ID");
                        var PATIENT_PHONE = ReportViewer.Report.FieldByName("PATIENT_PHONE");
                        var Patient_National = ReportViewer.Report.FieldByName("Patient_National");
                        var PATIENT_ID_NUM = ReportViewer.Report.FieldByName("PATIENT_ID_NUM");
                        var PATIENT_ARRIVE_CLASS = ReportViewer.Report.FieldByName("PATIENT_ARRIVE_CLASS");
                        var Patient_Hospital_Num = ReportViewer.Report.FieldByName("Patient_Hospital_Num");
                        var RegisterTime = ReportViewer.Report.FieldByName("RegisterTime");
                        var AdmissionPath = ReportViewer.Report.FieldByName("AdmissionPath");
                        var Patient_Pay_Type = ReportViewer.Report.FieldByName("Patient_Pay_Type");
                        var AdmissionTime = ReportViewer.Report.FieldByName("AdmissionTime");
                        var Base_AIS_Type = ReportViewer.Report.FieldByName("Base_AIS_Type");
                        var EMS_DISEASE_TIME = ReportViewer.Report.FieldByName("EMS_DISEASE_TIME");
                        var EMS_ARRIVEDOOR_TIME = ReportViewer.Report.FieldByName("EMS_ARRIVEDOOR_TIME");
                        var Base_AIS_Hospital = ReportViewer.Report.FieldByName("Base_AIS_Hospital");
                        var Assessment_MRS_Score = ReportViewer.Report.FieldByName("Assessment_MRS_Score");
                        var Assessment_Gcs_Score = ReportViewer.Report.FieldByName("Assessment_Gcs_Score");
                        var Assessment_Swallowing_Content = ReportViewer.Report.FieldByName("Assessment_Swallowing_Content");
                        var Assessment_Swallowing_Bool = ReportViewer.Report.FieldByName("Assessment_Swallowing_Bool");
                        var Assessment_CerebralHernia_Bool = ReportViewer.Report.FieldByName("Assessment_CerebralHernia_Bool");
                        var Patient_Height = ReportViewer.Report.FieldByName("Patient_Height");
                        var Patient_Weight = ReportViewer.Report.FieldByName("Patient_Weight");
                        var Patient_BMI = ReportViewer.Report.FieldByName("Patient_BMI");
                        var PATIENT_BLOOD_H = ReportViewer.Report.FieldByName("PATIENT_BLOOD_H");
                        var PATIENT_HEART = ReportViewer.Report.FieldByName("PATIENT_HEART");
                        var Bleeding_Parts_Left = ReportViewer.Report.FieldByName("Bleeding_Parts_Left");
                        var Bleeding_Parts_Right = ReportViewer.Report.FieldByName("Bleeding_Parts_Right");
                        var Bleeding_HP = ReportViewer.Report.FieldByName("Bleeding_HP");
                        var Intracranial_Vascular_Check = ReportViewer.Report.FieldByName("Intracranial_Vascular_Check");
                        var Etiology_Diagnosis = ReportViewer.Report.FieldByName("Etiology_Diagnosis");
                        var Surgery_Start_Time = ReportViewer.Report.FieldByName("Surgery_Start_Time");
                        var Surgery_IntervalStart_Minutes = ReportViewer.Report.FieldByName("Surgery_IntervalStart_Minutes");
                        var Surgery_IntervalArrive_Minutes = ReportViewer.Report.FieldByName("Surgery_IntervalArrive_Minutes");
                        var Surgery_Anesthesia_Type = ReportViewer.Report.FieldByName("Surgery_Anesthesia_Type");
                        var Patency_Complications = ReportViewer.Report.FieldByName("Patency_Complications");
                        var Patency_prognosis = ReportViewer.Report.FieldByName("Patency_prognosis");
                        var Surgery_Style = ReportViewer.Report.FieldByName("Surgery_Style");
                        var Drug_JYYW_Bool = ReportViewer.Report.FieldByName("Drug_JYYW_Bool");
                        var Drug_JYYW_Type = ReportViewer.Report.FieldByName("Drug_JYYW_Type");
                        var Drug_TZYW_Bool = ReportViewer.Report.FieldByName("Drug_TZYW_Bool");
                        var Drug_JTYW_Bool = ReportViewer.Report.FieldByName("Drug_JTYW_Bool");
                        var MoyamoyaDisease_Repeat_Time = ReportViewer.Report.FieldByName("MoyamoyaDisease_Repeat_Time");
                        var MoyamoyaDisease_NowPatency_Time = ReportViewer.Report.FieldByName("MoyamoyaDisease_NowPatency_Time");
                        var MoyamoyaDisease_Patency_Direction = ReportViewer.Report.FieldByName("MoyamoyaDisease_Patency_Direction");
                        var MoyamoyaDisease_Treatment_Style = ReportViewer.Report.FieldByName("MoyamoyaDisease_Treatment_Style");
                        var AVM_Patency_Time = ReportViewer.Report.FieldByName("AVM_Patency_Time");
                        var AVM_Type = ReportViewer.Report.FieldByName("AVM_Type");
                        var AVM_Patency_Type = ReportViewer.Report.FieldByName("AVM_Patency_Type");
                        var AVM_SpetzlerMarin_Score = ReportViewer.Report.FieldByName("AVM_SpetzlerMarin_Score");
                        var Rehabilitation_Treatment_Type = ReportViewer.Report.FieldByName("Rehabilitation_Treatment_Type");
                        var Rehabilitation_Treatment_Adress = ReportViewer.Report.FieldByName("Rehabilitation_Treatment_Adress");
                        var Health_Education_Bool = ReportViewer.Report.FieldByName("Health_Education_Bool");
                        var Health_Education_Type = ReportViewer.Report.FieldByName("Health_Education_Type");
                        var Hospital_Out_Time = ReportViewer.Report.FieldByName("Hospital_Out_Time");
                        var Hospital_Out_Type = ReportViewer.Report.FieldByName("Hospital_Out_Type");
                        var Death_Time = ReportViewer.Report.FieldByName("Death_Time");
                        var Death_Why = ReportViewer.Report.FieldByName("Death_Why");
                        var Hospital_MRS_Bool = ReportViewer.Report.FieldByName("Hospital_MRS_Bool");
                        var Hospital_GCS_Score = ReportViewer.Report.FieldByName("Hospital_GCS_Score");
                        var Hospital_Drug_Bool = ReportViewer.Report.FieldByName("Hospital_Drug_Bool");

                        Report.PrepareLoadData();
                        Recordset.Append();
                        //为标签对象赋值
                        PATIENT_NAME.AsString = IsEmpty(d.patientInfo.PATIENT_NAME) ? "" : d.patientInfo.PATIENT_NAME;
                        PATIENT_SEX.AsString = d.patientInfo.PATIENT_SEX == "1" ? "男" : "女";
                        PATIENT_AGE.AsString = IsEmpty(d.patientInfo.PATIENT_AGE) ? "" : d.patientInfo.PATIENT_AGE;
                        PATIENT_ID.AsString = IsEmpty(d.patientInfo.PATIENT_ID) ? "" : d.patientInfo.PATIENT_ID;
                        PATIENT_PHONE.AsString = IsEmpty(d.patientInfo.PATIENT_PHONE) ? "" : d.patientInfo.PATIENT_PHONE;
                        Patient_National.AsString = IsEmpty(d.patientSigns.Patient_National) ? "" : d.patientSigns.Patient_National;
                        PATIENT_ID_NUM.AsString = IsEmpty(d.patientInfo.PATIENT_ID_NUM) ? "" : d.patientInfo.PATIENT_ID_NUM;
                        PATIENT_ARRIVE_CLASS.AsString = GetArriveClassName(d.patientInfo.PATIENT_ARRIVE_CLASS);
                        Patient_Hospital_Num.AsString = IsEmpty(d.patientSigns.Patient_Hospital_Num) ? "" : d.patientSigns.Patient_Hospital_Num;
                        RegisterTime.AsString = obj2Timemm(d.patientInfo.RegisterTime);
                        AdmissionPath.AsString = GetAdmissionPath(d.ambulanceInfo.AdmissionPath);
                        Patient_Pay_Type.AsString = GetPatient_Pay_Type(d.patientSigns.Patient_Pay_Type);
                        AdmissionTime.AsString = obj2Timemm(d.ambulanceInfo.AdmissionTime);
                        Base_AIS_Type.AsString = GetBase_AIS_Type(d.patientCHMR == null || IsEmpty(d.patientCHMR.Base_AIS_Type) ? "" : d.patientCHMR.Base_AIS_Type);
                        EMS_DISEASE_TIME.AsString = obj2Timemm(d.ambulanceInfo.EMS_DISEASE_TIME);
                        EMS_ARRIVEDOOR_TIME.AsString = obj2Timemm(d.ambulanceInfo.EMS_ARRIVEDOOR_TIME);
                        Base_AIS_Hospital.AsString = d.patientCHMR == null || IsEmpty(d.patientCHMR.Base_AIS_Hospital) ? "" : (d.patientCHMR.Base_AIS_Hospital == "0" ? "否" : "是");
                        Assessment_MRS_Score.AsString = d.patientCHMR == null || d.patientCHMR.Assessment_MRS_Score == null || IsEmpty(d.patientCHMR.Assessment_MRS_Score) ? "" : d.patientCHMR.Assessment_MRS_Score;
                        Assessment_Gcs_Score.AsString = d.patientCHMR == null || d.patientCHMR.Assessment_Gcs_Score == null || IsEmpty(d.patientCHMR.Assessment_Gcs_Score) ? "" : d.patientCHMR.Assessment_Gcs_Score;
                        Assessment_Swallowing_Content.AsString = d.patientCHMR == null || IsEmpty(d.patientCHMR.Assessment_Swallowing_Content) ? "" : d.patientCHMR.Assessment_Swallowing_Content;
                        Assessment_Swallowing_Bool.AsString = d.patientCHMR == null || IsEmpty(d.patientCHMR.Assessment_Swallowing_Bool) || d.patientCHMR.Assessment_Swallowing_Bool == 0 ? "否" : "是";
                        Assessment_CerebralHernia_Bool.AsString = d.patientCHMR == null || IsEmpty(d.patientCHMR.Assessment_CerebralHernia_Bool) || d.patientCHMR.Assessment_CerebralHernia_Bool == 0 ? "否" : "是";
                        Patient_Height.AsString = IsEmpty(d.patientSigns.Patient_Height) ? "" : d.patientSigns.Patient_Height;
                        Patient_Weight.AsString = IsEmpty(d.patientSigns.Patient_Weight) ? "" : d.patientSigns.Patient_Weight;
                        Patient_BMI.AsString = IsEmpty(d.patientSigns.Patient_BMI) ? "" : d.patientSigns.Patient_BMI;
                        PATIENT_BLOOD_H.AsString = (IsEmpty(d.patientSigns.PATIENT_BLOOD_H) || IsEmpty(d.patientSigns.PATIENT_BLOOD_L)) ? "" : (d.patientSigns.PATIENT_BLOOD_H + "/" + d.patientSigns.PATIENT_BLOOD_L + " mmHg");
                        PATIENT_HEART.AsString = IsEmpty(d.patientSigns.PATIENT_HEART) ? "" : d.patientSigns.PATIENT_HEART;
                        Bleeding_Parts_Left.AsString = GetBleeding_Parts(d.patientCHMR == null || IsEmpty(d.patientCHMR.Bleeding_Parts_Left) ? "" : d.patientCHMR.Bleeding_Parts_Left);
                        Bleeding_Parts_Right.AsString = GetBleeding_Parts(d.patientCHMR == null || IsEmpty(d.patientCHMR.Bleeding_Parts_Right) ? "" : d.patientCHMR.Bleeding_Parts_Right);
                        Bleeding_HP.AsString = d.patientCHMR == null || IsEmpty(d.patientCHMR.Bleeding_HP) ? "" : d.patientCHMR.Bleeding_HP;
                        Intracranial_Vascular_Check.AsString = GetImage_Check_Style(d.patientCHMR == null || IsEmpty(d.patientCHMR.Intracranial_Vascular_Check) ? "" : d.patientCHMR.Intracranial_Vascular_Check);
                        Etiology_Diagnosis.AsString = GetEtiology_Diagnosis(d.patientCHMR == null || IsEmpty(d.patientCHMR.Etiology_Diagnosis) ? "" : d.patientCHMR.Etiology_Diagnosis);
                        Surgery_Start_Time.AsString = obj2Timemm(d.patientCHMR == null || IsEmpty(d.patientCHMR.Surgery_Start_Time) ? "" : d.patientCHMR.Surgery_Start_Time);
                        Surgery_IntervalStart_Minutes.AsString = d.patientCHMR == null || IsEmpty(d.patientCHMR.Surgery_IntervalStart_Minutes) ? "" : d.patientCHMR.Surgery_IntervalStart_Minutes;
                        Surgery_IntervalArrive_Minutes.AsString = d.patientCHMR == null || IsEmpty(d.patientCHMR.Surgery_IntervalArrive_Minutes) ? "" : d.patientCHMR.Surgery_IntervalArrive_Minutes;
                        Surgery_Anesthesia_Type.AsString = GetSurgery_Anesthesia_Type(d.patientCHMR == null || IsEmpty(d.patientCHMR.Surgery_Anesthesia_Type) ? "" : d.patientCHMR.Surgery_Anesthesia_Type);
                        Patency_Complications.AsString = GetPatency_Complications(d.patientCHMR == null || IsEmpty(d.patientCHMR.Patency_Complications) ? "" : d.patientCHMR.Patency_Complications);
                        Patency_prognosis.AsString = GetPatency_prognosis(d.patientCHMR == null || IsEmpty(d.patientCHMR.Patency_prognosis) ? "" : d.patientCHMR.Patency_prognosis);
                        Surgery_Style.AsString = GetSurgery_Style(d.patientCHMR == null || IsEmpty(d.patientCHMR.Surgery_Style) ? "" : d.patientCHMR.Surgery_Style.toString());
                        Drug_JYYW_Bool.AsString = d.patientCHMR == null || IsEmpty(d.patientCHMR.Drug_JYYW_Bool) ? "" : (d.patientCHMR.Drug_JYYW_Bool == "0" ? "否" : "是");
                        Drug_JYYW_Type.AsString = GetDrug_JYYW_Type(d.patientCHMR == null || IsEmpty(d.patientCHMR.Drug_JYYW_Type) ? "" : d.patientCHMR.Drug_JYYW_Type);
                        Drug_TZYW_Bool.AsString = d.patientCHMR == null || IsEmpty(d.patientCHMR.Drug_TZYW_Bool) || d.patientCHMR.Drug_TZYW_Bool == 0 ? "否" : "是";
                        Drug_JTYW_Bool.AsString = d.patientCHMR == null || IsEmpty(d.patientCHMR.Drug_JTYW_Bool) || d.patientCHMR.Drug_JTYW_Bool == 0 ? "否" : "是";
                        MoyamoyaDisease_Repeat_Time.AsString = obj2Timemm(d.patientCHMR == null || IsEmpty(d.patientCHMR.MoyamoyaDisease_Repeat_Time) ? "" : d.patientCHMR.MoyamoyaDisease_Repeat_Time);
                        MoyamoyaDisease_NowPatency_Time.AsString = obj2Timemm(d.patientCHMR == null || IsEmpty(d.patientCHMR.MoyamoyaDisease_NowPatency_Time) ? "" : d.patientCHMR.MoyamoyaDisease_NowPatency_Time);
                        MoyamoyaDisease_Patency_Direction.AsString = GetMoyamoyaDisease_Patency_Direction(d.patientCHMR == null || IsEmpty(d.patientCHMR.MoyamoyaDisease_Patency_Direction) ? "" : d.patientCHMR.MoyamoyaDisease_Patency_Direction);
                        MoyamoyaDisease_Treatment_Style.AsString = GetMoyamoyaDisease_Treatment_Style(d.patientCHMR == null || IsEmpty(d.patientCHMR.MoyamoyaDisease_Treatment_Style) ? "" : d.patientCHMR.MoyamoyaDisease_Treatment_Style);
                        AVM_Patency_Time.AsString = obj2Timemm(d.patientCHMR == null || IsEmpty(d.patientCHMR.AVM_Patency_Time) ? "" : d.patientCHMR.AVM_Patency_Time);
                        AVM_Type.AsString = GetAVM_Type(d.patientCHMR == null || IsEmpty(d.patientCHMR.AVM_Type) == null ? "" : d.patientCHMR.AVM_Type);
                        AVM_Patency_Type.AsString = GetAVM_Patency_Type(d.patientCHMR == null || IsEmpty(d.patientCHMR.AVM_Patency_Type) == null ? "" : d.patientCHMR.AVM_Patency_Type);
                        AVM_SpetzlerMarin_Score.AsString = d.patientCHMR == null || IsEmpty(d.patientCHMR.AVM_SpetzlerMarin_Score) ? "" : d.patientCHMR.AVM_SpetzlerMarin_Score;
                        Rehabilitation_Treatment_Type.AsString = GetRehabilitation_Treatment_Type(d.patientCHMR == null || IsEmpty(d.patientCHMR.Rehabilitation_Treatment_Type) ? "" : d.patientCHMR.Rehabilitation_Treatment_Type);
                        Rehabilitation_Treatment_Adress.AsString = GetRehabilitation_Treatment_Adress(d.patientCHMR == null || IsEmpty(d.patientCHMR.Rehabilitation_Treatment_Adress) ? "" : d.patientCHMR.Rehabilitation_Treatment_Adress);
                        Health_Education_Bool.AsString = d.patientCHMR == null || IsEmpty(d.patientCHMR.Health_Education_Bool) || d.patientCHMR.Health_Education_Bool == "0" ? "否" : "是";
                        Health_Education_Type.AsString = GetHealth_Education_Type(d.patientCHMR == null || IsEmpty(d.patientCHMR.Health_Education_Type) ? "" : d.patientCHMR.Health_Education_Type);
                        Hospital_Out_Time.AsString = obj2Timemm(d.patientCHMR == null || IsEmpty(d.patientCHMR.Hospital_Out_Time) ? "" : d.patientCHMR.Hospital_Out_Time);
                        Hospital_Out_Type.AsString = GetHospital_Out_Type(d.patientCHMR == null || IsEmpty(d.patientCHMR.Hospital_Out_Type) ? "" : d.patientCHMR.Hospital_Out_Type);
                        Death_Time.AsString = obj2Timemm(d.patientCHMR == null || IsEmpty(d.patientCHMR.Death_Time) ? "" : d.patientCHMR.Death_Time);
                        Death_Why.AsString = GetDeath_Why(d.patientCHMR == null || IsEmpty(d.patientCHMR.Death_Why) ? "" : d.patientCHMR.Death_Why);
                        Hospital_MRS_Bool.AsString = d.patientCHMR == null || IsEmpty(d.patientCHMR.Hospital_MRS_Score) ? "" : d.patientCHMR.Hospital_MRS_Score;
                        Hospital_GCS_Score.AsString = d.patientCHMR == null || IsEmpty(d.patientCHMR.Hospital_GCS_Score) ? "" : d.patientCHMR.Hospital_GCS_Score;
                        Hospital_Drug_Bool.AsString = GetHospital_Drug_Bool(d.patientCHMR == null || IsEmpty(d.patientCHMR.Hospital_Drug_Bool) ? "" : d.patientCHMR.Hospital_Drug_Bool);
                        //输出到模板
                        Recordset.Post();
                        ReportViewer.Start();
                    }
                }
            });
        }
        function GetAVM_Patency_Type(ids) {
            if (IsEmpty(ids)) return "";
            var idArray = ids.split(',');
            var res = "";
            for (var i = 0; i < idArray.length; i++) {
                switch (parseInt(idArray[i])) {
                    case 0: res += "栓塞术/"; break;
                    case 1: res += "血肿清除术/"; break;
                    case 2: res += "AVM切除术/"; break;
                    case 3: res += "放射外科手术/"; break;
                    case 4: res += "复合手术/"; break;
                    default: break;
                }
            }
            if (res.length > 0)
                res = res.substring(0, res.length - 1);
            return res;
        }
        function GetAVM_Type(id) {
            if (IsEmpty(id)) return "";
            switch (parseInt(id)) {
                case 0: return "脑实质AVM";
                case 1: return "脑膜脑AVM";
                default: return "";
            }
        }
        function GetMoyamoyaDisease_Treatment_Style(ids) {
            if (IsEmpty(ids)) return "";
            var idArray = ids.split(',');
            var res = "";
            for (var i = 0; i < idArray.length; i++) {
                switch (parseInt(idArray[i])) {
                    case 0: res += "STM/MTA搭桥/"; break;
                    case 1: res += "STA贴敷/"; break;
                    case 2: res += "颞肌贴敷/"; break;
                    case 3: res += "硬脑膜贴敷/"; break;
                    case 4: res += "其他/"; break;
                    default: break;
                }
            }
            if (res.length > 0)
                res = res.substring(0, res.length - 1);
            return res;
        }
        function GetMoyamoyaDisease_Patency_Direction(id) {
            if (IsEmpty(id)) return "";
            switch (parseInt(id)) {
                case 0: return "左侧";
                case 1: return "右侧";
                case 2: return "双侧";
                default: return "";
            }
        }
        function GetSurgery_Style(ids) {
            if (IsEmpty(ids)) return "";
            var idArray = ids.split(',');
            var res = "";
            for (var i = 0; i < idArray.length; i++) {
                switch (parseInt(idArray[i])) {
                    case 0: res += "开颅血肿清除术/"; break;
                    case 1: res += "去骨瓣减压术/"; break;
                    case 2: res += "脑室镜下血肿抽吸术/"; break;
                    case 3: res += "钻孔血肿抽吸术/"; break;
                    case 4: res += "颅内动脉瘤/"; break;
                    case 5: res += "硬脑膜动静脉痿/"; break;
                    case 6: res += "复合手术/"; break;
                    case 7: res += "其他/"; break;
                    default: return "";
                }
            }
            if (res.length > 0)
                res = res.substring(0, res.length - 1);
            return res;
        }
        function GetPatency_prognosis(ids) {
            if (IsEmpty(ids)) return "";
            var idArray = ids.split(',');
            var res = "";
            for (var i = 0; i < idArray.length; i++) {
                switch (parseInt(idArray[i])) {
                    case 0: res += "手术部位再次脑出血/"; break;
                    case 1: res += "手术远隔部位再出血/"; break;
                    case 2: res += "脑梗死/"; break;
                    case 3: res += "继发性癫痫/"; break;
                    case 4: res += "颅内感染/"; break;
                    case 5: res += "其他/"; break;
                    case 6: res += "无/"; break;
                    default: break;
                }
            }
            if (res.length > 0)
                res = res.substring(0, res.length - 1);
            return res;
        }
        function GetPatency_Complications(ids) {
            if (IsEmpty(ids)) return "";
            var idArray = ids.split(',');
            var res = "";
            for (var i = 0; i < idArray.length; i++) {
                switch (parseInt(idArray[i])) {
                    case 0: res += "手术部位再次脑出血/"; break;
                    case 1: res += "手术远隔部位再出血/"; break;
                    case 2: res += "脑梗死/"; break;
                    case 3: res += "继发性癫痫/"; break;
                    case 4: res += "颅内感染/"; break;
                    case 5: res += "其他/"; break;
                    case 6: res += "无/"; break;
                    default: break;
                }
            }
            if (res.length > 0)
                res = res.substring(0, res.length - 1);
            return res;
        }
        function GetEtiology_Diagnosis(ids) {
            if (IsEmpty(ids)) return "";
            var idArray = ids.split(',');
            var res = "";
            for (var i = 0; i < idArray.length; i++) {
                switch (parseInt(idArray[i])) {
                    case 0: res += "高血压/"; break;
                    case 1: res += "动静脉畸形AVM/"; break;
                    case 2: res += "烟雾病/"; break;
                    case 3: res += "血管淀粉样变性/"; break;
                    case 4: res += "颅内动脉瘤/"; break;
                    case 5: res += "硬脑膜动静脉痿/"; break;
                    case 6: res += "海绵状血管瘤/"; break;
                    case 7: res += "颅内动静脉窦血栓形成/"; break;
                    case 8: res += "其他/"; break;
                    default: break;
                }
            }
            if (res.length > 0)
                res = res.substring(0, res.length - 1);
            return res;
        }
        function GetBleeding_Parts(ids) {
            if (IsEmpty(ids)) return "";
            var idArray = ids.split(',');
            var res = "";
            for (var i = 0; i < idArray.length; i++) {
                switch (parseInt(idArray[i])) {
                    case 0: res += "基底节区/"; break;
                    case 1: res += "幕上脑叶/"; break;
                    case 2: res += "小脑/"; break;
                    case 3: res += "脑干/"; break;
                    case 4: res += "脑室/"; break;
                    default: break;
                }
            }
            if (res.length > 0)
                res = res.substring(0, res.length - 1);
            return res;
        }
        function GetDeath_Why(ids) {
            if (IsEmpty(ids)) return "";
            var idArray = ids.split(',');
            var res = "";
            for (var i = 0; i < idArray.length; i++) {
                switch (parseInt(idArray[i])) {
                    case 0: res += "呼吸循环衰竭/"; break;
                    case 1: res += "脑血管病/"; break;
                    case 2: res += "肺部感染/"; break;
                    case 3: res += "上消化道出血/"; break;
                    case 4: res += "急性肾功能衰竭/"; break;
                    case 5: res += "损伤和中毒/"; break;
                    case 6: res += "其他/"; break;
                    case 7: res += "不详/"; break;
                    default: break;
                }
            }
            if (res.length > 0)
                res = res.substring(0, res.length - 1);
            return res;
        }
        function GetEmbolotherapy_Clipping_ComplicationsType(ids) {
            if (IsEmpty(ids)) return "";
            var idArray = ids.split(',');
            var res = "";
            for (var i = 0; i < idArray.length; i++) {
                switch (parseInt(idArray[i])) {
                    case 0: res += "急性血栓形成/"; break;
                    case 1: res += "非载瘤动脉流域的血管/"; break;
                    case 2: res += "动脉瘤破裂/"; break;
                    case 3: res += "动脉瘤附近穿支血管闭塞/"; break;
                    case 4: res += "动脉夹层/"; break;
                    case 5: res += "穿刺部位并发症/"; break;
                    case 6: res += "其它术中并发症/"; break;
                    default: break;
                }
            }
            if (res.length > 0)
                res = res.substring(0, res.length - 1);
            return res;
        }
        function GetEmbolotherapy_Situation(id) {
            if (IsEmpty(id)) return "";
            switch (parseInt(id)) {
                case 0: return "无弹簧圈突出";
                case 1: return "有弹簧圈突出";
                case 2: return "载瘤动脉闭塞";
                default: return "";
            }
        }
        function GetSurgery_Clipping_Results(id) {
            if (IsEmpty(id)) return "";
            switch (parseInt(id)) {
                case 0: return "完全闭塞";
                case 1: return "瘤颈残留";
                case 2: return "部分瘤体残留";
                case 3: return "瘤体残留";
                default: return "";
            }
        }
        function GetEmbolotherapy_OtherMaterial(ids) {
            if (IsEmpty(ids)) return "";
            var idArray = ids.split(',');
            var res = "";
            for (var i = 0; i < idArray.length; i++) {
                switch (parseInt(idArray[i])) {
                    case 0: res += "Glubra/"; break;
                    case 1: res += "onyx/"; break;
                    case 2: res += "其他/"; break;
                    default: break;
                }
            }
            if (res.length > 0)
                res = res.substring(0, res.length - 1);
            return res;
        }
        function GetEmbolotherapy_Stents_Type(ids) {
            if (IsEmpty(ids)) return "";
            var idArray = ids.split(',');
            var res = "";
            for (var i = 0; i < idArray.length; i++) {
                switch (parseInt(idArray[i])) {
                    case 0: res += "Wingspan/"; break;
                    case 1: res += "Solitaire/"; break;
                    case 2: res += "Enterprise/"; break;
                    case 3: res += "Lvis/"; break;
                    case 4: res += "neuroform/"; break;
                    case 5: res += "Pipeline/"; break;
                    case 6: res += "tubridge/"; break;
                    case 7: res += "其他/"; break;
                    default: break;
                }
            }
            if (res.length > 0)
                res = res.substring(0, res.length - 1);
            return res;
        }
        function GetEmbolotherapy_Way_Type(ids) {
            if (IsEmpty(ids)) return "";
            var idArray = ids.split(',');
            var res = "";
            for (var i = 0; i < idArray.length; i++) {
                switch (parseInt(idArray[i])) {
                    case 0: res += "股动脉/"; break;
                    case 1: res += "桡动脉/"; break;
                    default: break;
                }
            }
            if (res.length > 0)
                res = res.substring(0, res.length - 1);
            return res;
        }
        function GetSurgery_Clipping_ComplicationsType(ids) {
            if (IsEmpty(ids)) return "";
            var idArray = ids.split(',');
            var res = "";
            for (var i = 0; i < idArray.length; i++) {
                switch (parseInt(idArray[i])) {
                    case 0: res += "载瘤动脉闭塞/"; break;
                    case 1: res += "术中动脉瘤破裂/"; break;
                    case 2: res += "动脉瘤附近穿支血管闭塞/"; break;
                    case 3: res += "其它/"; break;
                    default: break;
                }
            }
            if (res.length > 0)
                res = res.substring(0, res.length - 1);
            return res;
        }
        function GetSurgery_Clipping_Situation(id) {
            if (IsEmpty(id)) return "";
            switch (parseInt(id)) {
                case 0: return "通畅";
                case 1: return "轻度狭窄(<50%)";
                case 2: return "严重狭窄(>50%)";
                case 3: return "完全闭塞";
                default: return "";
            }
        }
        function GetImage_Tumor_Partseft(id) {
            if (IsEmpty(id)) return "";
            switch (parseInt(id)) {
                case 0: return "颈内动脉ICA";
                case 1: return "后交通动脉PComA";
                case 2: return "脉络膜前动脉AChA";
                case 3: return "大脑前动脉ACA";
                case 4: return "前交通动脉AcomA";
                case 5: return "大脑中动脉MCA";
                case 6: return "椎动脉VA";
                case 7: return "基底动脉BA";
                case 8: return "大脑后动脉PCA";
                case 9: return "小脑前下动脉AICA";
                case 10: return "小脑后下动脉PICA";
                case 11: return "小脑上动脉SCA";
                case 12: return "其他";
                default: return "";
            }
        }
        function GetImage_Tumor_Typeeft(id) {
            if (IsEmpty(id)) return "";
            switch (parseInt(id)) {
                case 0: return "梭形";
                case 1: return "囊状";
                case 2: return "夹层";
                case 3: return "假性动脉瘤";
                default: return "";
            }
        }
        function GetImage_Check_Style(ids) {
            if (IsEmpty(ids)) return "";
            var idArray = ids.split(',');
            var res = "";
            for (var i = 0; i < idArray.length; i++) {
                switch (parseInt(idArray[i])) {
                    case 0: res += "CTA/"; break;
                    case 1: res += "MRA/"; break;
                    case 2: res += "DSA/"; break;
                    case 3: res += "未查/"; break;
                    default: break;
                }
            }
            if (res.length > 0)
                res = res.substring(0, res.length - 1);
            return res;
        }
        function GetAssessment_Aneurysm_Type(id) {
            if (IsEmpty(id)) return "";
            switch (parseInt(id)) {
                case 0: return "本次破裂致蛛网膜下腔出血";
                case 1: return "本次破裂致蛛网膜下腔出血合并脑出血";
                case 2: return "未破裂";
                default: return "";
            }
        }
        function GetRehabilitation_Treatment_Type(ids) {
            if (IsEmpty(ids)) return "";
            var idArray = ids.split(',');
            var res = "";
            for (var i = 0; i < idArray.length; i++) {
                switch (parseInt(idArray[i])) {
                    case 0: res += "传统康复(针灸/推拿)/"; break;
                    case 1: res += "运动疗法(PT)/"; break;
                    case 2: res += "作业疗法(OT)/"; break;
                    case 3: res += "言语训练(ST)/"; break;
                    case 4: res += "其他(认知训练/吞咽治疗/心理治疗/理疗)/"; break;
                    default: break;
                }
            }
            if (res.length > 0)
                res = res.substring(0, res.length - 1);
            return res;
        }
        function GetRehabilitation_Treatment_Adress(ids) {
            if (IsEmpty(ids)) return "";
            var idArray = ids.split(',');
            var res = "";
            for (var i = 0; i < idArray.length; i++) {
                switch (parseInt(idArray[i])) {
                    case 0: res += "床旁/"; break;
                    case 1: res += "康复科/"; break;
                    default: break;
                }
            }
            if (res.length > 0)
                res = res.substring(0, res.length - 1);
            return res;
        }
        function GetDrug_JYYW_Type(ids) {
            if (IsEmpty(ids)) return "";
            var idArray = ids.split(',');
            var res = "";
            for (var i = 0; i < idArray.length; i++) {
                switch (parseInt(idArray[i])) {
                    case 0: res += "ACEI/"; break;
                    case 1: res += "ARB/"; break;
                    case 2: res += "利尿剂/"; break;
                    case 3: res += "β受体阻滞剂/"; break;
                    case 4: res += "钙拮抗剂/"; break;
                    case 5: res += "其他/"; break;
                    default: break;
                }
            }
            if (res.length > 0)
                res = res.substring(0, res.length - 1);
            return res;
        }
        function GetDrug_24HKN_Type(ids) {
            if (IsEmpty(ids)) return "";
            var idArray = ids.split(',');
            var res = "";
            for (var i = 0; i < idArray.length; i++) {
                switch (parseInt(idArray[i])) {
                    case 0: res += "华法令/"; break;
                    case 1: res += "利伐沙班/"; break;
                    case 2: res += "达比加群/"; break;
                    case 3: res += "阿哌沙班/"; break;
                    case 4: res += "依度沙班/"; break;
                    case 5: res += "低分子肝素/"; break;
                    case 6: res += "普通肝素/"; break;
                    case 7: res += "其他/"; break;
                    default: break;
                }
            }
            if (res.length > 0)
                res = res.substring(0, res.length - 1);
            return res;
        }
        function GetDrug_24HKXXB_Type(ids) {
            if (IsEmpty(ids)) return "";
            var idArray = ids.split(',');
            var res = "";
            for (var i = 0; i < idArray.length; i++) {
                switch (parseInt(idArray[i])) {
                    case 0: res += "阿司匹林/"; break;
                    case 1: res += "氯吡格雷/"; break;
                    case 2: res += "奥扎格雷/"; break;
                    case 3: res += "双嘧达莫/"; break;
                    case 4: res += "塞氯吡啶/"; break;
                    case 5: res += "西洛他唑/"; break;
                    case 6: res += "其他/"; break;
                    default: break;
                }
            }
            if (res.length > 0)
                res = res.substring(0, res.length - 1);
            return res;
        }
        function GetTreatment_Complications(ids) {
            if (IsEmpty(ids)) return "";
            var idArray = ids.split(',');
            var res = "";
            for (var i = 0; i < idArray.length; i++) {
                switch (parseInt(idArray[i])) {
                    case 0: res += "颅内出血/"; break;
                    case 1: res += "消化道出血/"; break;
                    case 2: res += "牙龈出血/"; break;
                    case 3: res += "其他部位出血/"; break;
                    case 4: res += "再灌注损伤/"; break;
                    case 5: res += "血管源性唇舌水肿/"; break;
                    case 6: res += "其他/"; break;
                    case 7: res += "无/"; break;
                    default: break;
                }
            }
            if (res.length > 0)
                res = res.substring(0, res.length - 1);
            return res;
        }
        function GetTreatment_Drug_Type(id) {
            if (IsEmpty(id)) return "";
            switch (parseInt(id)) {
                case 0: return "rt-PA";
                case 1: return "尿激酶";
                case 2: return "阿尼普酶";
                case 3: return "瑞替普酶";
                case 4: return "替奈普酶";
                case 5: return "其他";
                default: return "";
            }
        }
        function GetTreatment_Perform_Adress(id) {
            if (IsEmpty(id)) return "";
            switch (parseInt(id)) {
                case 0: return "本院急救车";
                case 1: return "本院急诊科";
                case 2: return "本院CT室";
                case 3: return "本院病房";
                case 4: return "外院";
                default: return "";
            }
        }
        function GetTOAST__Score(id) {
            if (IsEmpty(id)) return "";
            switch (parseInt(id)) {
                case 0: return "大动脉粥样硬化性卒中(LAA)";
                case 1: return "心源性脑梗塞(CE)";
                case 2: return "小动脉闭塞性卒中或腔隙性卒中(SAA)";
                case 3: return "其他原因所致的缺血性卒中(SOE)";
                case 4: return "不明原因的缺血性卒中(SUE)";
                default: return "";
            }
        }

        function GetBase_AIS_Type(id) {
            if (IsEmpty(id)) return "";
            switch (parseInt(id)) {
                case 0: return "已知";
                case 1: return "未知";
                case 2: return "醒后卒中";
                default: return "";
            }
        }
        function GetConsciousness(ids) {
            if (IsEmpty(ids)) return "";
            var idArray = ids.split(',');
            var res = "";
            for (var i = 0; i < idArray.length; i++) {
                switch (parseInt(idArray[i])) {
                    case 0: res += "清醒/"; break;
                    case 1: res += "对语言有反应/"; break;
                    case 2: res += "对刺痛有反应/"; break;
                    case 3: res += "对任何刺激无反应/"; break;
                    default: break;
                }
            }
            if (res.length > 0)
                res = res.substring(0, res.length - 1);
            return res;
        }
        function GetArriveClassName(id) {
            if (IsEmpty(id)) return "";
            switch (parseInt(id)) {
                case 0: return "本院急救车";
                case 1: return "当地120";
                case 2: return "外院转院";
                case 3: return "自行来院";
                default: return "";
            }
        }
        function GetAdmissionPath(id) {
            if (IsEmpty(id)) return "";
            switch (parseInt(id)) {
                case 0: return "急诊";
                case 1: return "门诊";
                case 2: return "其他医疗机构转入";
                case 3: return "其他";
                default: return "";
            }
        }
        function GetPatient_Pay_Type(id) {
            if (IsEmpty(id)) return "";
            switch (parseInt(id)) {
                case 0: return "城镇职工基本医疗保险";
                case 1: return "城镇居民基本医疗保险";
                case 2: return "新型农村合作医疗";
                case 3: return "贫困救助";
                case 4: return "商业医疗保险";
                case 5: return "全公费";
                case 6: return "全自费";
                case 7: return "其他社会保险";
                case 8: return "其他";
                default: return "";
            }
        }
        function GetAssessment_NeckBloodVessel_Type(ids) {
            if (IsEmpty(ids)) return "";
            var idArray = ids.split(',');
            var res = "";
            for (var i = 0; i < idArray.length; i++) {
                switch (parseInt(idArray[i])) {
                    case 0: res += "颈部血管超声/"; break;
                    case 1: res += "CTA/"; break;
                    case 2: res += "MRA/"; break;
                    case 3: res += "DSA/"; break;
                    case 4: res += "未查/"; break;
                    default: break;
                }
            }
            if (res.length > 0)
                res = res.substring(0, res.length - 1);
            return res;
        }
        function GetAssessment_NarrowArea_Type(id) {
            if (IsEmpty(id)) return "";
            switch (parseInt(id)) {
                case 0: return "颈总";
                case 1: return "球部";
                case 2: return "颈内";
                case 3: return "锁骨下动脉";
                case 4: return "椎动脉";
                case 5: return "无";
                default: return ""
            }
        }
        function GetSurgery_Location_Type(ids) {
            if (IsEmpty(ids)) return "";
            var idArray = ids.split(',');
            var res = "";
            for (var i = 0; i < idArray.length; i++) {
                switch (parseInt(idArray[i])) {
                    case 0: res += "LIA/"; break;
                    case 1: res += "RICA/"; break;
                    default: break;
                }
            }
            if (res.length > 0)
                res = res.substring(0, res.length - 1);
            return res;
        }
        function GetSurgery_Anesthesia_Type(id) {
            if (IsEmpty(id)) return "";
            switch (parseInt(id)) {
                case 0: return "全麻";
                case 1: return "局麻";
                default: return ""
            }
        }
        function GetSurgery_Detection_Type(ids) {
            if (IsEmpty(ids)) return "";
            var idArray = ids.split(',');
            var res = "";
            for (var i = 0; i < idArray.length; i++) {
                switch (parseInt(idArray[i])) {
                    case 0: res += "TCD/"; break;
                    case 1: res += "脑电图/"; break;
                    case 2: res += "其他/"; break;
                    default: break;
                }
            }
            if (res.length > 0)
                res = res.substring(0, res.length - 1);
            return res;
        }
        function GetSurgery_Type(id) {
            if (IsEmpty(id)) return "";
            switch (parseInt(id)) {
                case 0: return "标准式CEA";
                case 1: return "外翻式CEA";
                case 2: return "标准式CEA";
                case 3: return "CAS";
                case 4: return "复合手术";
                default: return ""
            }
        }
        function GetSurgery_Complications_Type(ids) {
            if (IsEmpty(ids)) return "";
            var idArray = ids.split(',');
            var res = "";
            for (var i = 0; i < idArray.length; i++) {
                switch (parseInt(idArray[i])) {
                    case 0: res += "脑梗死/"; break;
                    case 1: res += "高灌注/"; break;
                    case 2: res += "脑出血/"; break;
                    case 3: res += "周围神经损伤/"; break;
                    case 4: res += "切口感染/"; break;
                    case 5: res += "继发性癫痫/"; break;
                    case 6: res += "肺部感染/"; break;
                    case 7: res += "泌尿系感染/"; break;
                    case 8: res += "其他/"; break;
                    case 9: res += "无/"; break;
                    default: break;
                }
            }
            if (res.length > 0)
                res = res.substring(0, res.length - 1);
            return res;
        }
        function GetDrug_TZYW_Type(ids) {
            if (IsEmpty(ids)) return "";
            var idArray = ids.split(',');
            var res = "";
            for (var i = 0; i < idArray.length; i++) {
                switch (parseInt(idArray[i])) {
                    case 0: res += "他汀类/"; break;
                    case 1: res += "盐酸及其衍生物/"; break;
                    case 2: res += "贝特类/"; break;
                    case 3: res += "胆固醇吸收抑制器/"; break;
                    case 4: res += "其他/"; break;
                    default: break;
                }
            }
            if (res.length > 0)
                res = res.substring(0, res.length - 1);
            return res;
        }
        function GetDrug_JTYW_Type(ids) {
            if (IsEmpty(ids)) return "";
            var idArray = ids.split(',');
            var res = "";
            for (var i = 0; i < idArray.length; i++) {
                switch (parseInt(idArray[i])) {
                    case 0: res += "胰岛素/"; break;
                    case 1: res += "磺酰脲类/"; break;
                    case 2: res += "双胍类/"; break;
                    case 3: res += "a糖苷酶抑制剂/"; break;
                    case 4: res += "胰岛素增敏剂/"; break;
                    case 5: res += "非磺酰脲类促胰岛分泌剂/"; break;
                    case 6: res += "其他/"; break;
                    default: break;
                }
            }
            if (res.length > 0)
                res = res.substring(0, res.length - 1);
            return res;
        }
        function GetHealth_Education_Type(ids) {
            if (IsEmpty(ids)) return "";
            var idArray = ids.split(',');
            var res = "";
            for (var i = 0; i < idArray.length; i++) {
                switch (parseInt(idArray[i])) {
                    case 0: res += "集体病区教育/"; break;
                    case 1: res += "一对一教育/"; break;
                    case 2: res += "其他/"; break;
                    default: break;
                }
            }
            if (res.length > 0)
                res = res.substring(0, res.length - 1);
            return res;
        }
        function GetHospital_Out_Type(id) {
            if (IsEmpty(id)) return "";
            switch (parseInt(id)) {
                case 0: return "医嘱离院";
                case 1: return "医嘱转院";
                case 2: return "医嘱转社区服务机构/乡镇卫生院";
                case 3: return "非医嘱离院";
                case 4: return "死亡";
                case 5: return "其他";
                default: return ""
            }
        }

        function GetHospital_Drug_Bool(ids) {
            if (IsEmpty(ids)) return "";
            var idArray = ids.split(',');
            var res = "";
            for (var i = 0; i < idArray.length; i++) {
                switch (parseInt(idArray[i])) {
                    case 0: res += "降压药/"; break;
                    case 1: res += "降糖药/"; break;
                    case 2: res += "调脂药/"; break;
                    case 3: res += "抗凝药/"; break;
                    case 4: res += "抗血小板药/"; break;
                    case 5: res += "中药治疗/"; break;
                    case 6: res += "其他/"; break;
                    case 7: res += "无/"; break;
                    default: break;
                }
            }
            if (res.length > 0)
                res = res.substring(0, res.length - 1);
            return res;
        }
    </script>
</body>
</html>